<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://unpkg.com/vue@next"></script>
</head>
<body>
    <div id="app">
        <alert-box>something bad happened - {{message}}</alert-box>
        <br/>
        <span>{{message}}</span>
    </div>

    <script>
        const option={
            data() {
                return {
                    message:"lzh"
                }
            },
        }

        const app = Vue.createApp(option)
        app.component("alert-box",{
            template:`
                <div>
                    <strong>Error! </strong>
                    <slot></slot>
                </div>
            `
        })
        const vm = app.mount("#app")
    </script>
</body>
</html>